import React,{Component} from 'react';
import Adaptive from '../../component/adaptive/Adaptive';
import {asyncSize} from 'pofod/window.size';
import FirstScreen from '../components/first-screen/FirstScreen';
import ChoseService from './components/chose-service/ChoseService';
import MedicalCenter from '../components/medical-center/MedicalCenter';
// import Need from '../consultation/components/need/Need';
// import NeedMobile from '../consultation/components/need/mobile/NeedMobile';
import ServiceContent from '../consultation/components/service-content/ServiceContent';
import Reason from '../components/why-chose/Reason';
import Process from './components/process/Process';
import Footer from '../../component/footer/Footer';
import MobileFooter from '../../component/footer-mobile/FooterMobile';
import Lang from './Lang';
class Zhuanzhen extends Component{
    state = {
        noSwiping:(asyncSize().pageWidth)<1200?false:true
    };
    getNoSwiping = () => {
        if((asyncSize().pageWidth)<1200){
            this.setState({
                noSwiping:false
            })
        }else{
            this.setState({
                noSwiping:true
            })
        }
    };
    componentDidMount(){
      window.addEventListener('resize',this.getNoSwiping);
    };
    componentWillUnmount(){
        window.removeEventListener('resize',this.getNoSwiping);
    };
    render(){
        return(
           <div style={{overflow:"hidden"}}>
               <FirstScreen backgroundImg={require('./img/banner.jpg')} title={Lang.FirstScreen.title} content={Lang.FirstScreen.content}/>
               <ChoseService/>
               <Reason title={Lang.Reason.title} slideSource={Lang.Reason.slideSource} noSwiping={this.state.noSwiping}/>
               {/*<Adaptive desktop={ <Need title={Lang.who.title} source={Lang.who.source} background={require('./img/who_banner.jpg')}/>} phone={<NeedMobile title={Lang.who.title} source={Lang.who.source} background={require('./img/who_banner.jpg')}/>} size={950}/>*/}
               <ServiceContent title={Lang.serverContent.title} source={Lang.serverContent.source}/>
               <Process/>
               <MedicalCenter/>
               <Adaptive desktop={<Footer/>} phone={<MobileFooter/>} size={1200}/>
           </div>
        )
    }
}
export default Zhuanzhen;
